package com.qfjy.zhudongdong;

/**
 * @author : Z-Star
 * @version : 1.0
 * @date : 2022/9/13 18:55
 */

public class HexaObserver extends Observer{

    public HexaObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "16进制 String: "
                + Integer.toHexString( subject.getState() ).toUpperCase() );
    }
}
